<!--授予权限-->
<template>
  <div class="wrapper-container">
    <div class="table-container table-css">
      <el-table :data="tableData" border style="width: 100%" class="table-data" :header-cell-style="{background:'#edf2f9','border-color': '#c7d7eb'}">
        <el-table-column prop="teachAuthType" label="授权数据类型" align="center"></el-table-column>
        <el-table-column prop="teachersNames" label="单位" align="center"></el-table-column>
        <el-table-column label="被授予人" align="center" >
          <template slot-scope="scope">
            <span v-for="i in scope.row.teachers" :key="i.id">{{i.xm}}</span>
          </template>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
import {syqxList} from "@/api/lineData";
export default {
  data() {
    return {
      tableData: [],
    };
  },
  mounted(){
    this.initList()
  },
  methods: {
    //初始化表格
    async initList(){
      let res = await syqxList({xqmc:this.$route.query.xqmc});
      if(res.code == 200){
        this.tableData = [res.data];
      }else{
        this.$message.error(res.msg);
      }
    },
  },
};
</script>
<style lang="less" scoped>
.table-css {
  margin-top: 30px;
 /deep/ .el-table td,
  .el-table th.is-leaf,
  .el-table--border,
  .el-table--group {
    border-color: #c7d7eb;
  }

  /deep/.el-table__header tr,
  .el-table__header th {
    padding: 0;
    height: 76px;
    background-color: #edf2f9;
    font-size: 16px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    line-height: 20px;
    color: #004ca7;
  }

  /deep/.el-table__body tr,
  .el-table__body td {
    padding: 0;
    height: 86px;
  }
 /deep/ .el-table__footer-wrapper td {
    padding: 0;
    height: 86px;
  }
  /deep/.el-table thead.is-group th.el-table__cell{
    border-color: #c7d7eb;
  }
 /deep/ .el-table--border th, .el-table__fixed-right-patch{
    border-color: #c7d7eb;
  }
}
</style>

<style lang="less" scoped>
@import "../../../styles/commonCss.less";
</style>
